package com.itheima.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class FallbackController {
    /**
     * 为网关准备的服务降级方法
     * @return
     */
    @GetMapping("fallbackTest")
    public Map fallbackMethod(){
        Map map = new HashMap<>();
        map.put("code","502");
        map.put("msg","请求超时");
        return map;
    }

}
